package com.crrcdt.thread;

/**
 * @author lj on 2020/11/18.
 * @version 1.0
 */
public class MyTheardDemo02 extends Thread {
    private String name;
    public MyTheardDemo02(String name){
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10 ; i++) {
            System.out.println(name+ i+"运行");
        }
    }

    public static void main(String[] args) {
        final MyTheardDemo02 myTheardDemo01 = new MyTheardDemo02("线程A");
        final MyTheardDemo02 myTheardDemo02 = new MyTheardDemo02("线程B");
        myTheardDemo01.start();
        myTheardDemo02.start();
    }
}
